<template>
    <div>异步组件{{ value }}</div>
  </template>
  
  <script>
  export default {
    name: 'ComponentD',
    data() {
      return {
        value: ''
      }
    },
    methods: {
      getData() {
        return new Promise((resolve) => {
          setTimeout(() => {
            resolve('两秒后出现这句话异步组件数据')
          }, 2000)
        })
      }
    },
    mounted() {
      this.getData().then((res) => {
        this.value = res
      })
    }
  }
  </script>
  
  <style lang="scss" scoped></style>
  